Road = {}
Road.__index = Road
 
function Road.new()
    local instance = {
      typeObject = nil
    }
    
    setmetatable(instance, Road)
    return instance
end

setmetatable(Road,{__index = WorldObject})

function Road:setType(_type)
  self.typeObject = _type
end

function Road:getType()
  return self.typeObject
end

function Road:getTexture()
  if self.typeObject == "Road_Horizontal" then
    return textureRoadHorizontal
  elseif self.typeObject == "Road_Loop1" or self.typeObject == "Road_Loop2" 
          or self.typeObject == "Road_Loop3" or self.typeObject == "Road_Loop4" then
    return textureRoadLoop
  elseif self.typeObject == "Road_Split1" or self.typeObject == "Road_Split2" 
          or self.typeObject == "Road_Split3" or self.typeObject == "Road_Split4" then
    return textureRoadSplit
  elseif self.typeObject == "Road_Vertical" then
    return textureRoadVertical
  end
end

return Road